home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 011 / datetime.arc / SPEECH.INC < prev   
Encoding:
Text File  |  1987-05-01  |  4.9 KB  |  140 lines

  1. type
  2.   SpeechString = string[255];
  3.  
  4. procedure Speech(S: SpeechString);
  5.   external 'SPEECH.BIN';
  6.  
  7. procedure dayspeech(n: integer);  {speak days}
  8.   begin
  9.     case n of
  10.       01:     speech(' s-uh-n-d-a-a');
  11.       02:     speech(' m-uh-n-d-a-a');
  12.       03:     speech(' t-oo-s-d-a-a');
  13.       04:     speech(' w-eh-n-d-s-d-a-a');
  14.       05:     speech(' th-uh-r-s-d-a-a');
  15.       06:     speech(' f-r-i-d-a-a');
  16.       07:     speech(' s-ae-t-u-r-d-a-a');
  17.     end;
  18.   end;{dayspeech}
  19.  
  20. procedure monspeech(n: integer);  {speak months}
  21.   begin
  22.     case n of
  23.       01:     speech(' j-ae-n-y-oo-ae-r-ee');
  24.       02:     speech(' f-eh-b-y-oo-ae-r-ee');
  25.       03:     speech(' m-ah-r-ch');
  26.       04:     speech(' a-p-r-ih-l');
  27.       05:     speech(' m-a-y');
  28.       06:     speech(' j-oo-n');
  29.       07:     speech(' j-oo-l-i');
  30.       08:     speech(' aw-g-uh-s-t');
  31.       09:     speech(' s-eh-p-t-eh-m-b-u-r');
  32.       10:     speech(' ah-k-t-oh-b-u-r');
  33.       11:     speech(' n-oh-v-eh-m-b-u-r');
  34.       12:     speech(' d-ee-s-eh-m-b-u-r');
  35.    end;
  36.   end; {monspeech}
  37.  
  38. procedure numdayspeech(n: integer);
  39.   begin
  40.     case n of
  41.       01:           Speech(' f-ih-r-s-t');
  42.       02:           Speech(' s-eh-k-uh-n-d');
  43.       03:           Speech(' th-ih-r-d');
  44.       04:           Speech(' f-oh-r-th');
  45.       05:           Speech(' f-ih-f-f-th');
  46.       06:           Speech(' s-ih-k-s-th');
  47.       07:           Speech(' s-eh-v-eh-n-th');
  48.       08:           Speech(' a-ee-t-th');
  49.       09:           Speech(' n-i-n-th');
  50.       10:           Speech(' t-eh-n-th');
  51.       11:           Speech(' eh-l-eh-v-eh-n-th');
  52.       12:           Speech(' t-w-eh-l-th');
  53.       13:           Speech(' th-ih-r-t-ee-n-th');
  54.       14:           Speech(' f-oh-r-t-ee-n-th');
  55.       15:           Speech(' f-ih-f-t-ee-n-th');
  56.       16:           Speech(' s-ih-k-s-t-ee-n-th');
  57.       17:           Speech(' s-eh-v-eh-n-t-ee-n-th');
  58.       18:           Speech(' a-ee-t-t-ee-n-th');
  59.       19:           Speech(' n-i-n-t-ee-n-th');
  60.       20:           speech(' t-w-eh-n-t-ee-eh-th');
  61.       21..29:       begin
  62.                       Speech(' t-w-eh-n-t-ee');
  63.                       numdaySpeech(N - 20);
  64.                     end;
  65.       30:           speech(' th-ih-r-t-ee-eh-th');
  66.       31:           begin
  67.                       Speech(' th-ih-r-t-ee');
  68.                       NumdaySpeech(N - 30);
  69.                     end;
  70.       end;
  71.    end;{numdayspeech}
  72.  
  73. { This procedure speaks the positive integers 1 through 32768. }
  74. procedure NumSpeech(N: integer);
  75.   begin
  76.     case N of
  77.       01:           Speech(' wh-uh-n');
  78.       02:           Speech(' t-oo');
  79.       03:           Speech(' th-r-ee');
  80.       04:           Speech(' f-oh-r');
  81.       05:           Speech(' f-i-v');
  82.       06:           Speech(' s-ih-k-s');
  83.       07:           Speech(' s-eh-v-eh-n');
  84.       08:           Speech(' a-ee-t');
  85.       09:           Speech(' n-i-n');
  86.       10:           Speech(' t-eh-n');
  87.       11:           Speech(' eh-l-eh-v-eh-n');
  88.       12:           Speech(' t-w-eh-l-v');
  89.       13:           Speech(' th-ih-r-t-ee-n');
  90.       14:           Speech(' f-oh-r-t-ee-n');
  91.       15:           Speech(' f-ih-f-t-ee-n');
  92.       16:           Speech(' s-ih-k-s-t-ee-n');
  93.       17:           Speech(' s-eh-v-eh-n-t-ee-n');
  94.       18:           Speech(' a-ee-t-t-ee-n');
  95.       19:           Speech(' n-i-n-t-ee-n');
  96.       20..29:       begin
  97.                       Speech(' t-w-eh-n-t-ee');
  98.                       NumSpeech(N - 20);
  99.                     end;
  100.       30..39:       begin
  101.                       Speech(' th-ih-r-t-ee');
  102.                       NumSpeech(N - 30);
  103.                     end;
  104.       40..49:       begin
  105.                       Speech(' f-oh-r-t-ee');
  106.                       NumSpeech(N - 40);
  107.                     end;
  108.       50..59:       begin
  109.                       Speech(' f-ih-f-t-ee');
  110.                       NumSpeech(N - 50);
  111.                     end;
  112.       60..69:       begin
  113.                       Speech(' s-ih-k-s-t-ee');
  114.                       NumSpeech(N - 60);
  115.                     end;
  116.       70..79:       begin
  117.                       Speech(' s-eh-v-eh-n-t-ee');
  118.                       NumSpeech(N - 70);
  119.                     end;
  120.       80..89:       begin
  121.                       Speech(' a-ee-t-ee');
  122.                       NumSpeech(N - 80);
  123.                     end;
  124.       90..99:       begin
  125.                       Speech(' n-i-n-t-ee');
  126.                       NumSpeech(N - 90);
  127.                     end;
  128.       100..999:     begin
  129.                       NumSpeech(N div 100);
  130.                       Speech(' h-uh-n-d-r-eh-d');
  131.                       NumSpeech(N mod 100);
  132.                     end;
  133.       1000..maxint: begin
  134.                       NumSpeech(N div 1000);
  135.                       Speech(' th-aw-u-s-ae-n-d');
  136.                       NumSpeech(N mod 1000);
  137.                     end;
  138.     end;
  139.   end {NumSpeech};
  140.